@extends('admin.index.index')
@section('content')
<div class="col-md-12 col-sm-12 col-xs-12">
    <div class="panel panel-default bk-bg-white">
        <div class="panel-heading bk-bg-white">
            <h6><i class="fa fa-indent red"></i>添加分类</h6>
            @if(count($errors)>0)
                <div class="alert alert-danger" role="alert">
                    @if(is_object($errors))
                        @foreach($errors->all() as $error)
                            {{$error}}
                        @endforeach
                    @else
                        {{$errors}}
                    @endif
                </div>
            @endif
            <div class="panel-actions">
                <a href="#" class="btn-minimize"><i class="fa fa-caret-up"></i></a>
                <a href="#" class="btn-close"><i class="fa fa-times"></i></a>
            </div>
        </div>
        <div class="panel-body">
            <form action="{{url('admin/category')}}" method="post" class="form-horizontal ">
                <input type="hidden" name="_token" value="{{csrf_token()}}">
                <div class="form-group">
                    <label class="col-md-3 control-label" for="select">父级分类</label>
                    <div class="col-md-9">
                        <select id="select" name="cate_pid" class="form-control input-lg" size="1">
                            <option value="0">=请选择顶级分类=</option>
                            @foreach($data as $v)
                            <option value="{{$v->cate_id}}">{{$v->cate_name}}</option>
                            @endforeach
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label" for="text-input">分类名称</label>
                    <div class="col-md-9">
                        <input type="text" id="text-input" name="cate_name" class="form-control" placeholder="分类名称">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label" for="email-input">分类标题</label>
                    <div class="col-md-9">
                        <input type="text" id="email-input" name="cate_title" class="form-control" placeholder="分类标题">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label" for="password-input">关键词</label>
                    <div class="col-md-9">
                        <input type="text" id="password-input" name="cate_keywords" class="form-control" placeholder="关键词">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label" for="textarea-input">描述</label>
                    <div class="col-md-9">
                        <textarea id="textarea-input" name="cate_description" rows="9" class="form-control" placeholder="请简单描述一下该类别.."></textarea>
                    </div>
                </div>
                <br>
                <div class="form-group">
                    <label class="col-md-3 control-label" for="password-input" ></label>
                    <div class="col-md-9">
                        <input type="submit" value="添加" class="button bk-margin-5 btn btn-primary">
                        <input type="reset" value="重置" class="button bk-margin-5 btn btn-default">
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
@stop